package io.gitee.hechenl.easyopc.service.impl;

import io.gitee.hechenl.easyopc.opcua.EasyOpcUaClient;
import io.gitee.hechenl.easyopc.service.IOpcUaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OpcUaServiceImpl implements IOpcUaService {

    @Autowired
    private EasyOpcUaClient easyOpcUaClient;

    @Override
    public String read(String id) {
        Object value = easyOpcUaClient.read(2, id);
        return value == null ? null : String.valueOf(value);
    }
}
